package animal;

public class Test {
    public static void main(String[] args) {
        Animal animal = new Cat();
        animal.eat();
        Cat cat = (Cat) animal;//强制转换，向下转型
        animal=new Dog();//指向堆内存的dog的地址
        Dog dog= (Dog) animal;

        Cat cat1= (Cat) animal;

    }
}
